package com.iweb.service;

import com.iweb.mapper.TypeMapper;
import com.iweb.pojo.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImp implements TypeService {
    @Autowired
    TypeMapper typeMapper;
    @Override
    public Boolean insert(Type type) {
        return typeMapper.insert(type)>0;
    }

    @Override
    public Type selectType(String name) {
        return typeMapper.selectType(name);
    }

    @Override
    public List selectAll() {
        return typeMapper.selectList(2);
    }


}
